#region "WebStringExtensions"

/*
 * ####     Developer Name : Wang Yucai
 * 
 * ####     Development Tool : Microsoft VisualStudio 2010 Ultimate Edition
 * 
 * ####     Create Time : 2014-07-14 14:14:38
 * 
 * ####     Namespace : System.Web
 * 
 * ####     Type Name : WebStringExtensions
 * 
 * ####     Full Name : System.Web.WebStringExtensions
 * 
 * ####     Machine Name : GLCHQWYCWINW7
 * 
 * ####     UserName : GUOCOLAND/wangyucai
 * 
 * ####     CLR Version : 4.0.30319.18444
 * 
 * ####     Target Framework Version : 4.0
 */

#endregion

using System.Text;

namespace System.Web
{
    /// <summary>
    /// <para>System.Web.WebStringExtensions</para>
    /// <para>
    /// 为<see cref="String"/>类型提供的扩展方法。
    /// </para>
    /// </summary>
    /// <remarks>
    /// <para>Target Framework Version : 4.0</para>
    /// </remarks>
    public static class WebStringExtensions
    {
        #region UrlEncode
        /// <summary>
        /// 对URL字符串进行编码。
        /// </summary>
        /// <param name="current">需要编码的URL字符串。</param>
        /// <param name="encoding">编码器。</param>
        /// <returns>编码后的字符串。</returns>
        static public string UrlEncode(this string current, Encoding encoding)
        {
            return HttpUtility.UrlEncode(current, encoding);
        }

        /// <summary>
        /// 对URL字符串进行编码。
        /// </summary>
        /// <param name="current">需要编码的URL字符串。</param>
        /// <returns>编码后的字符串。</returns>
        static public string UrlEncode(this string current)
        {
            return HttpUtility.UrlEncode(current);
        }
        #endregion

        #region UrlDecode
        /// <summary>
        /// 对URL字符串进行解码。
        /// </summary>
        /// <param name="current">需要解码的字符串。</param>
        /// <param name="encoding">解码器。</param>
        /// <returns>解码后的URL字符串。</returns>
        static public string UrlDecode(this string current, Encoding encoding)
        {
            return HttpUtility.UrlDecode(current, encoding);
        }

        /// <summary>
        /// 对URL字符串进行解码。
        /// </summary>
        /// <param name="current">需要解码的字符串。</param>
        /// <returns>解码后的URL字符串。</returns>
        static public string UrlDecode(this string current)
        {
            return HttpUtility.UrlDecode(current);
        }
        #endregion
    }
}

#region README

/*
 * ####     ©2014 Wang Yucai
 * 
 * ####     Contact me
 *                  
 *                  E-mail : Masterduner@Yeah.net
 *                  Mobile : 13621384677
 *                  QQ : 180261899
 */

#endregion